LAMMPS (3 Nov 2022)
# electrodes with constant potential using finite field
# for z-periodic gold-saline electrochemical cell
# using Thomas-Fermi metallicity model: electrode q and qz will be
# smaller because of more delocalized charge

boundary p p p # ffield uses periodic z-boundary and no slab
include settings.mod # styles, groups, computes and fixes
units real
# distribute electrode atoms among all processors:
if "$(extract_setting(world_size) % 2) == 0" then "processors * * 2"

atom_style full
pair_style lj/cut/coul/long 15
bond_style harmonic
angle_style harmonic
kspace_style pppm/electrode 1e-7

read_data "data.au-aq"
Reading data file ...
  orthogonal box = (0 0 0) to (36.629993 36.629993 107.95213)
  1 by 1 by 1 MPI processor grid
  reading atoms ...
  9798 atoms
  reading velocities ...
  9798 velocities
  scanning bonds ...
  2 = max bonds/atom
  scanning angles ...
  1 = max angles/atom
  reading bonds ...
  4320 bonds
  reading angles ...
  2160 angles
Finding 1-2 1-3 1-4 neighbors ...
  special bond factors lj:    0        0        0       
  special bond factors coul:  0        0        0       
     2 = max # of 1-2 neighbors
     1 = max # of 1-3 neighbors
     1 = max # of 1-4 neighbors
     2 = max # of special neighbors
  special bonds CPU = 0.003 seconds
  read_data CPU = 0.065 seconds

group bot type 6
1620 atoms in group bot
group top type 7
1620 atoms in group top

group SPC type 1 2 3
6480 atoms in group SPC
group electrolyte type 1 2 3 4 5
6558 atoms in group electrolyte

fix nvt electrolyte nvt temp 298.0 298.0 241
fix shake SPC shake 1e-4 20 0 b 1 2 a 1
Finding SHAKE clusters ...
       0 = # of size 2 clusters
       0 = # of size 3 clusters
       0 = # of size 4 clusters
    2160 = # of frozen angles
  find clusters CPU = 0.002 seconds

variable q atom q
variable qz atom q*(z-lz/2)
compute qtop top reduce sum v_q
compute qbot bot reduce sum v_q
compute qztop top reduce sum v_qz
compute qzbot bot reduce sum v_qz
compute ctemp electrolyte temp


fix conp bot electrode/conp -1.0 1.805132 couple top 1.0 symm on ffield yes etypes on
3240 atoms in group conp_group
fix_modify conp tf 6 1.0 18.1715745
fix_modify conp tf 7 1.0 18.1715745

thermo 50
thermo_style custom step temp c_ctemp epair etotal c_qtop c_qbot c_qztop c_qzbot
run 500

CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE

Your simulation uses code contributions which should be cited:

- kspace_style pppm/electrode command:

@article{Ahrens2021,
author = {Ahrens-Iwers, Ludwig J.V. and Mei{\ss}ner, Robert H.},
doi = {10.1063/5.0063381},
title = {{Constant potential simulations on a mesh}},
journal = {Journal of Chemical Physics},
year = {2021}
volume = {155},
pages = {104104},
}
- fix electrode command:

@article{Ahrens2022
author = {Ahrens-Iwers, Ludwig J.V. and Janssen, Mahijs and Tee, Shern R. and Mei{\ss}ner, Robert H.},
doi = {10.1063/5.0099239},
title = {{ELECTRODE: An electrochemistry package for LAMMPS}},
journal = {The Journal of Chemical Physics},
year = {2022}
volume = {157},
pages = {084801},
}
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE

PPPM/electrode initialization ...
  using 12-bit tables for long-range coulomb (src/kspace.cpp:342)
  G vector (1/distance) = 0.24017705
  grid = 54 54 120
  stencil order = 5
  estimated absolute RMS force accuracy = 3.6312561e-05
  estimated relative force accuracy = 1.093542e-07
  using double precision MKL FFT
  3d grid and FFT values/proc = 472567 349920
Generated 21 of 21 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
  update: every = 1 steps, delay = 0 steps, check = yes
  max neighbors/atom: 2000, page size: 100000
  master list distance cutoff = 17
  ghost atom cutoff = 17
  binsize = 8.5, bins = 5 5 13
  3 neighbor lists, perpetual/occasional/extra = 2 1 0
  (1) pair lj/cut/coul/long, perpetual
      attributes: half, newton on
      pair build: half/bin/newton
      stencil: half/bin/3d
      bin: standard
  (2) fix electrode/conp, occasional, skip from (1)
      attributes: half, newton on
      pair build: skip
      stencil: none
      bin: none
  (3) fix electrode/conp, perpetual, skip from (1)
      attributes: half, newton on
      pair build: skip
      stencil: none
      bin: none
Per MPI rank memory allocation (min/avg/max) = 194.8 | 194.8 | 194.8 Mbytes
   Step          Temp         c_ctemp         E_pair         TotEng         c_qtop         c_qbot        c_qztop        c_qzbot    
         0   171.61215      298.06731     -39001.911     -35095.255      4.0804484     -4.0804484      79.075127      131.20697    
        50   147.14308      255.56782     -39665.525     -36315.894      3.9990346     -3.9990346      77.497181      128.57759    
       100   149.94935      260.44194     -39679.441     -36265.927      3.8613914     -3.8613914      74.82985       124.15315    
       150   151.95924      263.93285     -39677.184     -36217.916      3.8677064     -3.8677064      74.957279      124.33201    
       200   151.66737      263.42591     -39618.173     -36165.549      3.99842       -3.99842        77.491015      128.54496    
       250   152.36874      264.64408     -39579.164     -36110.574      3.9925863     -3.9925863      77.379445      128.37226    
       300   153.83916      267.19802     -39554.899     -36052.836      3.94995       -3.94995        76.553896      127.00395    
       350   155.88897      270.75827     -39535.02      -35986.294      4.0598524     -4.0598524      78.679643      130.5394     
       400   156.51993      271.85415     -39484.219     -35921.13       4.1312898     -4.1312898      80.060368      132.83598    
       450   160.21339      278.26919     -39517.776     -35870.607      3.9068098     -3.9068098      75.713484      125.59216    
       500   161.63639      280.74075     -39488.333     -35808.771      3.9261656     -3.9261656      76.080599      126.22255    
Loop time of 185.804 on 1 procs for 500 steps with 9798 atoms

Performance: 0.233 ns/day, 103.225 hours/ns, 2.691 timesteps/s, 26.366 katom-step/s
100.0% CPU use with 1 MPI tasks x no OpenMP threads

MPI task timing breakdown:
Section |  min time  |  avg time  |  max time  |%varavg| %total
---------------------------------------------------------------
Pair    | 91         | 91         | 91         |   0.0 | 48.98
Bond    | 0.0010315  | 0.0010315  | 0.0010315  |   0.0 |  0.00
Kspace  | 40.32      | 40.32      | 40.32      |   0.0 | 21.70
Neigh   | 5.6505     | 5.6505     | 5.6505     |   0.0 |  3.04
Comm    | 0.15304    | 0.15304    | 0.15304    |   0.0 |  0.08
Output  | 0.0041829  | 0.0041829  | 0.0041829  |   0.0 |  0.00
Modify  | 48.607     | 48.607     | 48.607     |   0.0 | 26.16
Other   |            | 0.06807    |            |       |  0.04

Nlocal:           9798 ave        9798 max        9798 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost:          31718 ave       31718 max       31718 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs:    8.25685e+06 ave 8.25685e+06 max 8.25685e+06 min
Histogram: 1 0 0 0 0 0 0 0 0 0

Total # of neighbors = 8256852
Ave neighs/atom = 842.7079
Ave special neighs/atom = 1.3227189
Neighbor list builds = 23
Dangerous builds = 0
Total wall time: 0:06:18
